'use strict';
/**
 * @params {name, author}
 * @bussiness {搜索栏}
 * @author JC
 * @date 2022-08-15
 * **/

const Controller = require('egg').Controller;
class Search extends Controller {
    //搜索
    async search() {
        const {
            ctx
        } = this
        const params = ctx.request.body;
        const result = await this.service.search.searchNovelsOrAuthorByClassesOrName(params)
        ctx.body = {
            msg: 200,
            data: result,
        }
    }
}

module.exports = Search